package it.kion.util.ui.umenumanager2.views;

import it.kion.util.ui.umenumanager2.model.MenuItem;

import org.eclipse.core.runtime.IAdaptable;

/*
 * The content provider class is responsible for providing objects to the view. It can wrap existing objects in adapters or simply return
 * objects as-is. These objects may be sensitive to the current input of the view, or ignore it and always show the same content (like Task
 * List, for example).
 */
public class TreeObject implements IAdaptable {

	private String name;

	private TreeParent parent;

	private MenuItem wrappedObj;

	public TreeObject(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setParent(TreeParent parent) {
		this.parent = parent;
	}

	public TreeParent getParent() {
		return parent;
	}

	public String toString() {
		return getName();
	}

	@SuppressWarnings("unchecked")
	public Object getAdapter(Class key) {
		return null;
	}

	public MenuItem getWrappedObject() {
		return wrappedObj;
	}

	public Object getWrappedObj() {
		return wrappedObj;
	}

	public void setWrappedObj(MenuItem wrappedObj) {
		this.wrappedObj = wrappedObj;
	}
}